package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ConstitutionMapper;
import com.ruoyi.system.domain.Constitution;
import com.ruoyi.system.service.IConstitutionService;

/**
 * 体质信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-11-25
 */
@Service
public class ConstitutionServiceImpl implements IConstitutionService 
{
    @Autowired
    private ConstitutionMapper constitutionMapper;

    /**
     * 查询体质信息
     * 
     * @param constitutionId 体质信息主键
     * @return 体质信息
     */
    @Override
    public Constitution selectConstitutionByConstitutionId(Long constitutionId)
    {
        return constitutionMapper.selectConstitutionByConstitutionId(constitutionId);
    }

    /**
     * 查询体质信息列表
     * 
     * @param constitution 体质信息
     * @return 体质信息
     */
    @Override
    public List<Constitution> selectConstitutionList(Constitution constitution)
    {
        return constitutionMapper.selectConstitutionList(constitution);
    }

    /**
     * 新增体质信息
     * 
     * @param constitution 体质信息
     * @return 结果
     */
    @Override
    public int insertConstitution(Constitution constitution)
    {
        return constitutionMapper.insertConstitution(constitution);
    }

    /**
     * 修改体质信息
     * 
     * @param constitution 体质信息
     * @return 结果
     */
    @Override
    public int updateConstitution(Constitution constitution)
    {
        return constitutionMapper.updateConstitution(constitution);
    }

    /**
     * 批量删除体质信息
     * 
     * @param constitutionIds 需要删除的体质信息主键
     * @return 结果
     */
    @Override
    public int deleteConstitutionByConstitutionIds(Long[] constitutionIds)
    {
        return constitutionMapper.deleteConstitutionByConstitutionIds(constitutionIds);
    }

    /**
     * 删除体质信息信息
     * 
     * @param constitutionId 体质信息主键
     * @return 结果
     */
    @Override
    public int deleteConstitutionByConstitutionId(Long constitutionId)
    {
        return constitutionMapper.deleteConstitutionByConstitutionId(constitutionId);
    }
}
